package com.zhang.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDate;

/**
 * 活动实体类
 */

@Data
@NoArgsConstructor
public class Activity {
       /**活动编号*/
        private int id;
        /**活动名称*/
        private String name;
        /**活动加入时间*/
        private LocalDate startTime;
        /**活动地址*/
        private String address;
        /**活动组织人*/
        private String person;
        /**活动所属学校*/
        private School school;

    public Activity(String name, LocalDate startTime, String address, String person,int schoolId) {
        this.name = name;
        this.startTime = startTime;
        this.address = address;
        this.person = person;
        this.school = new School();
        this.school.setId(schoolId);
    }

    @Override
    public String toString() {
        return "Activity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", startTime=" + startTime +
                ", address='" + address + '\'' +
                ", person='" + person + '\'' +
                ", school=" + school +
                '}'+"\n";
    }
}
